/**
 * Copyright (c) 2011 eelpo.com
 * All rights reserved.
 */
package com.eelpo.cmmp.uac.services;

import java.util.List;

import com.eelpo.cmmp.core.exception.ServiceException;
import com.eelpo.cmmp.uac.dao.vo.Permission;

/**
 * <pre>
 * 
 * 权限管理服务层接口定义
 * 
 * </pre>
 * 
 * @author <a href="mailto:Brian@eelpo.com">汪洪州</a>
 * @since 1.0
 */
public interface IPermissionManageService {

	/**
	 * 新增权限
	 * 
	 * @param permission
	 *            权限对象
	 * @return 返回新增过的权限Id
	 * @throws ServiceException
	 *             抛出服务层业务异常
	 */
	public String addPermission(Permission permission) throws ServiceException;

	/**
	 * 根据用户ID获取用户所有权限
	 * 
	 * @param userId
	 *            用户ID
	 * @return 返回指定用户的所有权限
	 * @throws ServiceException
	 *             抛出服务层业务异常
	 */
	public List<Permission> getPermissions(String userId) throws ServiceException;
}
